package com.brotherly.framework.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class StartReceiver extends BroadcastReceiver {

    public static final String TAG = "ValentineClock.StartReceiver";

    public StartReceiver()
    {}

    @Override
    public void onReceive(Context context, Intent intent)
    {
        String action = intent.getAction();
        Log.d(TAG, intent.getAction());
        if (action.equals(Intent.ACTION_MEDIA_UNMOUNTED))
        {
            Toast.makeText(context, "Media UnMounted", Toast.LENGTH_SHORT).show();
            System.exit(0);
        } else if (action.equals(Intent.ACTION_MEDIA_MOUNTED))
        {
            Log.d(TAG, "ValentineClock Start");
        }
    }
}
